import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginPage from "@/views/登录账户.vue";
import RegisterPage from "@/views/注册账户.vue";
import forget from "@/views/忘记密码.vue";
import orderTotal from '@/views/订单汇总.vue'
import myfabu from '@/views/我的发布.vue'
import ShangPinFaBu from '@/views/商品发布.vue'
import dingdan from '@/views/查看订单.vue'
import sousuo from "@/views/搜索商品.vue";
import GoodsDetail from "@/views/商品详情.vue"
import UpdateGoods from "@/views/更新商品.vue"
import OrderSubmit from "@/views/提交订单.vue"
import ProductPage from "@/views/已出租订单.vue"
import MainPage from "@/views/mainPage"
import GeRenZhuYe from '@/views/个人主页.vue'
import Setting from '@/views/Setting.vue'
import MySetting from '@/views/MySetting.vue'
import AddressList from '@/views/AddressList.vue'
import AddressEdit from '@/views/AddressEdit.vue'
import AccountSetting from '@/views/AccountSetting.vue'
import Order from '@/views/发货界面.vue'
import Balance from '@/views/我的余额.vue'
import 聊天汇总 from '@/views/聊天汇总.vue'
import 聊天详情 from '@/views/聊天详情.vue'
import 手机 from '@/views/分类/分类_手机.vue'
import 游戏机 from '@/views/分类/分类_游戏机.vue'
import 笔记本 from '@/views/分类/分类_笔记本.vue'
import 摄影摄像 from '@/views/分类/分类_摄影摄像.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: MainPage,
    },
    {
        path: '/forget',
        component: forget,
    },
    {
        path: '/phone',
        component: 手机,
    },
    {
        path: '/xbox',
        component: 游戏机,
    },
    {
        path: '/laptop',
        component: 笔记本,
    },
    {
        path: '/Photography',
        component: 摄影摄像,
    },
    {
        path: '/c',
        component: 聊天汇总,
    },
    {
        path: '/d',
        component: 聊天详情,
    },
    {
        name: '登录账户',
        path: '/login',
        component: LoginPage,
    },
    {
        name: '注册账户',
        path: '/register',
        component: RegisterPage
    }, {
        name: 'orderTotal',
        path: '/orderTotal',
        component: orderTotal,
    },
    {
        name: 'myfabu',
        path: '/myfabu',
        component: myfabu,
    },

    {
        name: 'shangpinfabu',
        path: '/shangpinfabu',
        component: ShangPinFaBu,
    },
    {
        name: '查看订单',
        path: '/dingdan',
        component: dingdan,
    },

    {
        name: '已出租订单',
        path: '/productpage',
        component: ProductPage,
    },

    {
        name: 'sousuo',
        path: '/sousuo',
        component: sousuo,
    },
    {
        name: 'goodsdetail',
        path: '/goodsdetail',
        component: GoodsDetail,
    },
    {
        name: 'ordersubmit',
        path: '/ordersubmit',
        component: OrderSubmit,

    }, {
        name: 'main',
        path: '/main',
        component: MainPage
    }, {
        path: '*',
        redirect: "/main"
    },
    {
        name: '个人主页',
        path: '/gerenzhuye',
        component: GeRenZhuYe,

    },
    {
        name: 'Setting',
        path: '/setting',
        component: Setting,

    },
    {
        name: 'MySetting',
        path: '/mysetting',
        component: MySetting,
    },
    {
        name: 'AddressList',
        path: '/addresslist',
        component: AddressList,
    },
    {
        name: 'AddressEdit',
        path: '/addressedit',
        component: AddressEdit,
    },
    {
        name: 'AccountSetting',
        path: '/accountsetting',
        component: AccountSetting,
    },
    {
        name: 'ProductPage',
        path: '/productpage',
        component: ProductPage,
    },
    {
        name: 'Delivery',
        path: '/delivery',
        component: Order,
    },
    {
        name: 'Balance',
        path: '/balance',
        component: Balance,
    },
    {
        name: 'UpdateGoods',
        path: '/updateGoods',
        component: UpdateGoods,
    },
];

const router = new VueRouter({
    mode: 'history',
    routes  //去掉url中的#
})
export { router };
